<template>
  <el-dialog
    :visible.sync="dialogVisible"
    :modal="false"
    :before-close="closeDialog"
    :show-close="false"
    class="my-info-dialog"
    customClass="customWidth"
    @open="open()" top="10px">
    <dv-border-box-3 style="width: 1785px;height: 945px;margin-left: -23px;margin-top: -33px">
      <dv-border-box-8 style="width: 1785px;height: 945px;margin-left: -23px;margin-top: -33px">
        <br>
        <div class="box">
          <div class="left">
            <div ref="ref_left" style="height: 100%;width: 100%"/>
          </div>
          <el-button type="primary" class="dataChangeBtn" style="top: 30px;" @click="changeData('industry')">
            <div style="transform: skewX(45deg);">行业</div>
          </el-button>
          <el-button type="primary" class="dataChangeBtn" style="top: 70px;" @click="changeData('area')">
            <div style="transform: skewX(45deg);">区县</div>
          </el-button>
          <div class="right">
            <dv-scroll-board :config="cooperationHandleMax" style="width: 100%; height: 100%;" @click="dataPosition"/>
          </div>
        </div>
      </dv-border-box-8>
    </dv-border-box-3>
  </el-dialog>
</template>

<script>
import echarts from "echarts";
import api from "@/api/gs";
import {round} from "_echarts@4.9.0@echarts/src/util/number";
import axios from "_axios@0.25.0@axios";

const Highcharts = require('highcharts')

export default {
  name: "screen1",
  props: {
    dialogVisible: Boolean
  },
  data() {
    return {
      companyName: '',
      cooperationHandleMax: {
        header: ['企业名称', '所属行业', '负责人', '联系电话', '统筹区'],
        headerHeight: 40,
        data: [],
        index: true,
        indexHeader: '#',
        columnWidth: [80, 300, 120, 120, 150, 120],
        rowNum: 13,
        align: ['left'],
        headerBGC: '#1A293C',
        oddRowBGC: '#023358',
        evenRowBGC: '#041F3A',
        hoverPause: false
      },
      treeDatas: {
        name: '金华市',
        value: '330700',
        children: [
          {
            name: '市本级',
            value: '330799',
            children: [
              {
                name: 'XXX有限公司1',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司2',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司3',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司4',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司5',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司6',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司7',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              }
            ]
          },
          {
            name: '义乌市',
            value: '330799',
            children: [
              {
                name: 'XXX有限公司1',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司2',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: '金华尖峰科技有限责任公司',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：互联网', value: '1'}]
              },
              {
                name: 'XXX有限公司4',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司5',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司6',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司7',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              }
            ]
          },
          {
            name: '东阳市',
            value: '330799',
            children: [
              {
                name: 'XXX有限公司1',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司2',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司3',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司4',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司5',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司6',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司7',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              }
            ]
          },
          {
            name: '兰溪市',
            value: '330799',
            children: [
              {
                name: 'XXX有限公司1',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司2',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司3',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司4',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司5',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司6',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司7',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              }
            ]
          },
          {
            name: '永康市',
            value: '330799',
            children: [
              {name: 'XXX有限公司1', children: [{name: '案件数12件'}, {name: '基金支出12万元'}, {name: '事故率0.3%'}, {name: '行业：制造业'}]},
              {name: 'XXX有限公司2', children: [{name: '案件数12件'}, {name: '基金支出12万元'}, {name: '事故率0.3%'}, {name: '行业：制造业'}]},
              {name: 'XXX有限公司3', children: [{name: '案件数12件'}, {name: '基金支出12万元'}, {name: '事故率0.3%'}, {name: '行业：制造业'}]},
              {name: 'XXX有限公司4', children: [{name: '案件数12件'}, {name: '基金支出12万元'}, {name: '事故率0.3%'}, {name: '行业：制造业'}]},
              {name: 'XXX有限公司5', children: [{name: '案件数12件'}, {name: '基金支出12万元'}, {name: '事故率0.3%'}, {name: '行业：制造业'}]},
              {name: 'XXX有限公司6', children: [{name: '案件数12件'}, {name: '基金支出12万元'}, {name: '事故率0.3%'}, {name: '行业：制造业'}]},
              {name: 'XXX有限公司7', children: [{name: '案件数12件'}, {name: '基金支出12万元'}, {name: '事故率0.3%'}, {name: '行业：制造业'}]}
            ]
          },
          {
            name: '武义县',
            value: '330799',
            children: [
              {
                name: 'XXX有限公司1',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司2',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司3',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司4',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司5',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司6',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司7',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              }
            ]
          },
          {
            name: '浦江县',
            value: '330799',
            children: [
              {
                name: 'XXX有限公司1',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司2',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司3',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司4',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司5',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司6',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司7',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              }
            ]
          },
          {
            name: '磐安县',
            value: '330799',
            children: [
              {
                name: 'XXX有限公司1',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司2',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司3',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司4',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司5',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司6',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司7',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              }
            ]
          },

        ]
      },
      myChart: null,
      depthOpen: 1,
      childrenNode: {
        name: '金华尖峰科技有限责任公司',
        value: '1',
        children: [
          {name: '案件数12件', value: '1'},
          {name: '基金支出12万元', value: '1'},
          {name: '事故率0.3%', value: '1'},
          {name: '行业：互联网', value: '1'}
        ]
      },
    }
  },
  methods: {
    // 回到初始树形数据
    changeData(dataName) {
      let dataIndustry = {
        name: '金华市',
        value: '330700',
        children: [
          {
            name: '市本级',
            value: '330799',
            children: [
              {
                name: 'XXX有限公司1',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司2',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司3',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司4',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司5',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司6',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司7',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              }
            ]
          },
          {
            name: '义乌市',
            value: '330799',
            children: [
              {
                name: 'XXX有限公司1',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司2',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: '金华尖峰科技有限责任公司',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：互联网', value: '1'}]
              },
              {
                name: 'XXX有限公司4',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司5',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司6',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司7',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              }
            ]
          },
          {
            name: '东阳市',
            value: '330799',
            children: [
              {
                name: 'XXX有限公司1',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司2',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司3',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司4',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司5',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司6',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司7',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              }
            ]
          },
          {
            name: '兰溪市',
            value: '330799',
            children: [
              {
                name: 'XXX有限公司1',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司2',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司3',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司4',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司5',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司6',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司7',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              }
            ]
          },
          {
            name: '永康市',
            value: '330799',
            children: [
              {name: 'XXX有限公司1', children: [{name: '案件数12件'}, {name: '基金支出12万元'}, {name: '事故率0.3%'}, {name: '行业：制造业'}]},
              {name: 'XXX有限公司2', children: [{name: '案件数12件'}, {name: '基金支出12万元'}, {name: '事故率0.3%'}, {name: '行业：制造业'}]},
              {name: 'XXX有限公司3', children: [{name: '案件数12件'}, {name: '基金支出12万元'}, {name: '事故率0.3%'}, {name: '行业：制造业'}]},
              {name: 'XXX有限公司4', children: [{name: '案件数12件'}, {name: '基金支出12万元'}, {name: '事故率0.3%'}, {name: '行业：制造业'}]},
              {name: 'XXX有限公司5', children: [{name: '案件数12件'}, {name: '基金支出12万元'}, {name: '事故率0.3%'}, {name: '行业：制造业'}]},
              {name: 'XXX有限公司6', children: [{name: '案件数12件'}, {name: '基金支出12万元'}, {name: '事故率0.3%'}, {name: '行业：制造业'}]},
              {name: 'XXX有限公司7', children: [{name: '案件数12件'}, {name: '基金支出12万元'}, {name: '事故率0.3%'}, {name: '行业：制造业'}]}
            ]
          },
          {
            name: '武义县',
            value: '330799',
            children: [
              {
                name: 'XXX有限公司1',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司2',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司3',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司4',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司5',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司6',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司7',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              }
            ]
          },
          {
            name: '浦江县',
            value: '330799',
            children: [
              {
                name: 'XXX有限公司1',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司2',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司3',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司4',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司5',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司6',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司7',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              }
            ]
          },
          {
            name: '磐安县',
            value: '330799',
            children: [
              {
                name: 'XXX有限公司1',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司2',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司3',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司4',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司5',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司6',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司7',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              }
            ]
          },

        ]
      };
      let dataArea = {
        name: '行业',
        value: '330700',
        children: [
          {
            name: '制造业',
            value: '330799',
            children: [
              {
                name: 'XXX有限公司1',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司2',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司3',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司4',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司5',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司6',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司7',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              }
            ]
          },
          {
            name: '餐饮业',
            value: '330799',
            children: [
              {
                name: 'XXX有限公司1',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司2',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: '金华尖峰科技有限责任公司',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：互联网', value: '1'}]
              },
              {
                name: 'XXX有限公司4',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司5',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司6',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司7',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              }
            ]
          },
          {
            name: '服务业',
            value: '330799',
            children: [
              {
                name: 'XXX有限公司1',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司2',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司3',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司4',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司5',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司6',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司7',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              }
            ]
          },
          {
            name: '互联网',
            value: '330799',
            children: [
              {
                name: 'XXX有限公司1',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司2',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司3',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司4',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司5',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司6',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司7',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              }
            ]
          },
          {
            name: '矿业',
            value: '330799',
            children: [
              {name: 'XXX有限公司1', children: [{name: '案件数12件'}, {name: '基金支出12万元'}, {name: '事故率0.3%'}, {name: '行业：制造业'}]},
              {name: 'XXX有限公司2', children: [{name: '案件数12件'}, {name: '基金支出12万元'}, {name: '事故率0.3%'}, {name: '行业：制造业'}]},
              {name: 'XXX有限公司3', children: [{name: '案件数12件'}, {name: '基金支出12万元'}, {name: '事故率0.3%'}, {name: '行业：制造业'}]},
              {name: 'XXX有限公司4', children: [{name: '案件数12件'}, {name: '基金支出12万元'}, {name: '事故率0.3%'}, {name: '行业：制造业'}]},
              {name: 'XXX有限公司5', children: [{name: '案件数12件'}, {name: '基金支出12万元'}, {name: '事故率0.3%'}, {name: '行业：制造业'}]},
              {name: 'XXX有限公司6', children: [{name: '案件数12件'}, {name: '基金支出12万元'}, {name: '事故率0.3%'}, {name: '行业：制造业'}]},
              {name: 'XXX有限公司7', children: [{name: '案件数12件'}, {name: '基金支出12万元'}, {name: '事故率0.3%'}, {name: '行业：制造业'}]}
            ]
          },
          {
            name: '道路运输业',
            value: '330799',
            children: [
              {
                name: 'XXX有限公司1',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司2',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司3',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司4',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司5',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司6',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司7',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              }
            ]
          },
          {
            name: '建筑业',
            value: '330799',
            children: [
              {
                name: 'XXX有限公司1',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司2',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司3',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司4',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司5',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司6',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司7',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              }
            ]
          },
          {
            name: '渔业',
            value: '330799',
            children: [
              {
                name: 'XXX有限公司1',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司2',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司3',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司4',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司5',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司6',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              },
              {
                name: 'XXX有限公司7',
                value: '1',
                children: [{name: '案件数12件', value: '1'}, {name: '基金支出12万元', value: '1'}, {
                  name: '事故率0.3%',
                  value: '1'
                }, {name: '行业：制造业', value: '1'}]
              }
            ]
          },
        ]
      };
      dataName == 'industry' ? this.treeDatas = dataIndustry : this.treeDatas = dataArea;
      this.leftOption();
    },
    // 列表数据定位
    dataPosition(value) {
      console.log(value.rowIndex)
      this.myChart.dispose();
      this.treeDatas = this.childrenNode;
      this.leftOption();
    },
    // 月份初始化
    initMonth() {
      const date = new Date();
      let year = date.getFullYear();
      const lastMonthTemp = date.getMonth();
      this.lastMonth = year + ('' + lastMonthTemp).padStart(2, '0');
      let firstMonthTemp = lastMonthTemp - 5;
      if (firstMonthTemp <= 0) {
        year -= 1;
        this.firstMonth = '' + year + ('' + (12 + parseInt(firstMonthTemp))).padStart(2, '0');
      }
    },
    initFundSettlement() {
      const handleDataDemo = [];
      for (let i = 0; i < 20; i++) { // 生成示例数据
        handleDataDemo[handleDataDemo.length] = ['金华尖峰科技有限责任公司', '互联网', '李立四', '13077877933', '市本级'];
      }
      this.cooperationHandleMax.data = handleDataDemo
    },
    leftOption() {
      let colors = [
        "#00ADD0",
        "#FFA12F",
        "#B62AFF",
        "#604BFF",
        "#6E35FF",
        "#002AFF",
        "#20C0F4",
        "#95F300",
        "#04FDB8",
        "#AF5AFF",
      ];
      let that = this;
      let getdata = function getData() {
        let data = that.treeDatas;
        let arr = [];
        arr.push(data);
        arr = handle(arr, 0);
        return arr;
      };
      let handle = function handleData(data, index, color = "#00f6ff") {
        //index标识第几层
        return data.map((item, index2) => {
          //计算出颜色
          if (index == 1) {
            color = colors.find((item, eq) => eq == index2 % 10);
          }
          // 设置节点大小
          if (index === 0 || index === 1) {
            item.label = {
              position: "inside",
            };
          }
          // 设置label大小
          switch (index) {
            case 0:
              item.symbolSize = 100;
              break;
            case 1:
              item.symbolSize = 80;
              break;
            default:
              item.symbolSize = 30;
              break;
          }
          // 设置线条颜色
          item.lineStyle = {color: color};

          if (item.children) {
            //存在子节点
            item.itemStyle = {
              borderColor: color,
              color: color,
            };
            item.children = handle(item.children, index + 1, color);
          } else {
            //不存在
            item.itemStyle = {
              color: "transparent",
              borderColor: color,
            };
          }
          return item;
        });
      };
      this.myChart = echarts.init(this.$refs.ref_left)
      let myChart = this.myChart;
      let option = {
        type: "tree",
        backgroundColor: 'transparent',
        tooltip: {
          //提示框
          trigger: "item",
          triggerOn: "mousemove",
          backgroundColor: "rgba(1,70,86,1)",
          borderColor: "rgba(0,246,255,1)",
          borderWidth: 0.5,
          textStyle: {
            fontSize: 10,
          },
        },
        series: [
          {
            type: "tree",
            hoverAnimation: true, //hover样式
            data: getdata(),
            top: 45,
            bottom: 45,
            left: 0,
            right: 0,
            layout: "radial",
            symbol: "circle",
            symbolSize: 10,
            nodePadding: 20,
            animationDurationUpdate: 750,
            expandAndCollapse: true, //子树折叠和展开的交互，默认打开
            initialTreeDepth: 1,
            roam: true, //是否开启鼠标缩放和平移漫游。scale/move/true
            focusNodeAdjacency: true,
            itemStyle: {
              borderWidth: 7,
            },
            label: {
              //标签样式
              color: "#fff",
              fontSize: 25,
              fontFamily: "SourceHanSansCN",
              position: "inside",
              rotate: 0,
            },
            lineStyle: {
              width: 1,
              curveness: 0.5,
            },
          },
        ],
      };
      option && myChart.setOption(option);
      this.touch(option, myChart);
    },
    touch(option, myChart) {
      if (option && typeof option === "object") {
        myChart.setOption(option, true);
        // 保持展开父节点仅一个
        // myChart.on('mousedown', (e) => {
        //   const name = e.data.name;
        //   const curNode = myChart._chartsViews[0]._data.tree._nodes.find(item => {
        //     return item.name === name;
        //   });
        //   const depth = curNode.depth;
        //   const curIsExpand = curNode.isExpand;
        //   myChart._chartsViews[0]._data.tree._nodes.forEach((item, index) => {
        //     if (item.depth === depth && item.name !== name && !curIsExpand) {
        //       item.isExpand = false;
        //     }
        //   });
        // })
      }
    },
    // 组装树结构数据
    getData(param) {
      let data = {
        name: "金华市",
        value: 0,
        children: [],
      };
      for (let i = 1; i <= 8; i++) {
        let obj = {
          name: "统筹区" + i,
          value: i,
          children: [],
        };
        for (let j = 1; j <= 5; j++) {
          let obj2 = {
            name: `节点1-${i}-${j}`,
            value: 1 + "-" + i + "-" + j,
          };
          if (j % 2 == 1) {
            obj2.children = [];
            for (let k = 1; k <= 3; k++) {
              let obj3 = {
                name: `节点1-${i}-${j}-${k}`,
                value: 1 + "-" + i + "-" + j + "-" + k,
              };
              obj2.children.push(obj3);
            }
          }
          obj.children.push(obj2);
        }
        data.children.push(obj);
      }
      let arr = [];
      arr.push(data);
      //
      arr = handle(arr, 0);
      console.log(arr);
      return arr;
    },
    // 获取重点企业清单
    getCaseCompany() {
      // const dataDemo = [];
      // for (let i = 0; i < 20; i++) { // 生成示例数据
      //   dataDemo[dataDemo.length] = ['金华尖峰科技有限责任公司', '互联网', '李立四', '13077877933', '市本级'];
      // }

      let param = {};
      param.areaCode = '330700';
      param.startYear = '202109';
      param.endYear = '202202';
      param.orderFlag = '1';
      axios.post(api.getCaseCompany, param).then(res => {
        if (res.data.code) {
          console.log('初始化图表数据--获取重点企业清单--错误!');
          console.log(res.data);
        }
        // 组装轮播表数据
        let trulyData = [];
        for (const item of res.data.result) {
          trulyData[trulyData.length] = [
            item.industry, '暂无数据', '暂无数据', '暂无数据', '暂无数据'
          ]
        }
        // 用于处理dataV数据更新无法重新渲染的问题
        let temp = {...this.cooperationHandleMax};
        temp.data = trulyData;
        this.cooperationHandleMax = {...temp};

        // 组装树状图的行业数据
      }).catch(err => {
      });
    },
    // 子屏弹窗回调
    open() {
      this.$nextTick(() => {
        this.initMonth();
        this.leftOption();
        this.getCaseCompany();
      })
    },
    // 关闭弹窗回调，调用父组件方法
    closeDialog() {
      this.$emit("closeDialog")
    },
  }
}
</script>

<style scoped>
* {
  margin: 0;
  padding: 0;
  font-family: 微软雅黑;
}

body {
  width: 100%;
  height: 100%;
}

main {
  width: 1737px;
  height: 833px;
  margin-left: 46px;
}

.left {
  float: left;
  height: 100%;
  width: 60%;
}

.right {
  float: left;
  height: 100%;
  width: 40%;
}

.box {
  width: 1735px;
  height: 897px;
  margin-top: 5px;
  margin-left: 47px;
  margin-bottom: 35px;
}

.dataChangeBtn {
  position: absolute;
  z-index: 2;
  right: 715px;
  font-size: 20px;
  width: 62px;
  height: 22px;
  transform: skewX(-45deg);
}

.btn_bottom :hover {
  color: #F9D494;
}

footer {
  background: url("../assets/footer.png") no-repeat;
  overflow: hidden;
  background-size: cover;
  height: 8.2%;
  width: 100%;
  position: absolute;
  bottom: 0;
}
</style>

<style>
.my-info-dialog .el-dialog__body {
  background-image: url("../assets/bg07.jpg");
  width: 1740px;
  height: 880px;
  overflow: hidden;
  background-size: cover;
  margin-top: -30px;
}

.customWidth {
  width: 1780px;
  height: 940px;
}
</style>
